package mapstruct.mapper;// UserMapper.java

import com.pro.common.api.depencies.config.CommonMappingConfig;
import mapstruct.UserTest;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.factory.Mappers;

@Mapper(
        componentModel = "spring",
        config = CommonMappingConfig.class,
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE
)
public interface UserTestMapper {
    UserTestMapper INSTANCE = Mappers.getMapper(UserTestMapper.class);

    @InheritConfiguration(name = "ignoreBaseFieldsWithFromId")
//    @InheritConfiguration(name = "ignoreBaseFields")
    UserTest build(UserTest entity);

    @InheritConfiguration(name = "ignoreBaseFieldsWithFromId")
    void update(UserTest source, @MappingTarget UserTest target);
}
